
import 'Definition.dart';
import 'PingPong.dart';

class UserModel extends Definition {
  
	/// 编号
	int? id;
	/// 登录账号
	String? username;
	/// 昵称
	String? nickname;
	/// 真实姓名
	String? realname;
	/// 邮箱
	String? email;
	/// 手机号码
	String? mobile;
	/// 默认分组
	int? default_group_id;
	/// 密码
	String? password;
	/// 创建时间
	String? created_dt;
	/// 最近登录时间
	String? last_login_time;
	/// 头像
	String? avatar;
	/// 粉丝数量
	int? fans_count;
	/// 关注数量
	int? follow_count;
	PingPong? pingPong;

  @override
  Map<String, dynamic> toJson() {
    return {
			"id": id,
			"username": username,
			"nickname": nickname,
			"realname": realname,
			"email": email,
			"mobile": mobile,
			"default_group_id": default_group_id,
			"password": password,
			"created_dt": created_dt,
			"last_login_time": last_login_time,
			"avatar": avatar,
			"fans_count": fans_count,
			"follow_count": follow_count,
			"pingPong": pingPong?.toJson(),
    };
  }

  @override
  void fromJson(Map<String, dynamic> json) {
		id = json["id"];
		username = json["username"];
		nickname = json["nickname"];
		realname = json["realname"];
		email = json["email"];
		mobile = json["mobile"];
		default_group_id = json["default_group_id"];
		password = json["password"];
		created_dt = json["created_dt"];
		last_login_time = json["last_login_time"];
		avatar = json["avatar"];
		fans_count = json["fans_count"];
		follow_count = json["follow_count"];
		pingPong = json["pingPong"] == null ? null : (PingPong()..fromJson(json["pingPong"]));
  }
  
}
  